<?php  
	require_once('./include/cache_start.php');
	include_once("maincore.php");
	if (!defined("THNOJ")) die ("Outside of the site");
	//if (!isset($myid)) redirect("index.php");
	require_once("oj-header.php");
?>

<?php if(isset($_GET['cid']))
	$cid=intval($_GET['cid']);
if (isset($_GET['pid']))
	$pid=intval($_GET['pid']);
?>

<?php
$contest_ok=true;
$str_private="SELECT count(*) FROM `contest` WHERE `contest_id`='$cid' && `private`='1'";
$result=mysql_query($str_private);
$row=mysql_fetch_row($result);
mysql_free_result($result);
if ($row[0]=='1' && !isset($_SESSION['c'.$cid])) $contest_ok=false;
if (($_SESSION['user_rights']=="A")) $contest_ok=true;
?>
<div id=main>
